package OBS;
/**
 *
 * @author Daniel Koch
 */
public class Customer {
    private int id;
    private String name;
    private BatchReportSystem[] batchReportSystems = new BatchReportSystem[0];
    private OBSReportSubscriber[] OBSReportSubscribers = new OBSReportSubscriber[0];

    /**
     * 
     * @param id
     * @param name
     * @param batchReportSystems
     * @param OBSReportSubscribers
     */
    public Customer(int id, String name, BatchReportSystem[] batchReportSystems, OBSReportSubscriber[] OBSReportSubscribers) {
        this.id = id;
        this.name = name;
        if(batchReportSystems != null) {
            this.batchReportSystems = batchReportSystems;
        }
        if(OBSReportSubscribers != null){
            this.OBSReportSubscribers = OBSReportSubscribers;
        }
    }

    /**
     * 
     * @return
     */
    public String toString() {
        return this.name;
    }

    /**
     * 
     * @return
     */
    public OBSReportSubscriber[] getOBSReportSubscribers() {
        return this.OBSReportSubscribers;
    }

    /**
     * 
     * @return
     */
    public BatchReportSystem[] getBatchReportSystems() {
        return this.batchReportSystems;
    }

    /**
     * 
     * @return
     */
    public int getID() {
        return this.id;
    }

    /**
     * 
     * @return
     */
    public String getName() {
        return this.name;
    }

    /**
     * 
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 
     * @param o
     * @return
     */
    public boolean equals(Object o) {
        if (!(o instanceof Customer)) {
            return false;
        }
        Customer customer = (Customer)o;
        return this.id == customer.getID();
    }
}
